package cn.cpf.aop.xml;

import org.aspectj.lang.ProceedingJoinPoint;

public abstract class XmlProxy {

    abstract protected void println(String string);

    public void before() {
        println(" before no args ");
    }

    public void after() {
        println(" after ");
    }

    public void afterReturn(Object rst) {
        println(" afterReturn ");
    }

    public void afterThrow(Throwable e) {
        println(" afterThrow " + e.toString());
    }

    public void around(ProceedingJoinPoint pjp) {
        println(" around start ");
        try {
            pjp.proceed();
        } catch (Throwable throwable) {
            println(" around throwable ");
            throwable.printStackTrace();
        }
        println(" around end ");
    }
}
